Skip to content
This repository was archived by the owner on Sep 24, 2019. It is now read-only.

Add GraphQL Gem, Add Directory Structure#4

Merged
xuorig merged 4 commits intomasterfrom
directory-structure-basic-setup
Feb 7, 2017
Merged

Add GraphQL Gem, Add Directory Structure#4
xuorig merged 4 commits intomasterfrom
directory-structure-basic-setup

Conversation

@xuorig
Copy link
Copy Markdown
Collaborator

@xuorig xuorig commented Feb 7, 2017

Adds the GraphQL gem to gemfile and sets up a basic directory structure.

app/
  graph/
    mutations/
    query.rb

@cjoudrey

Comment thread app/graph/query.rb Outdated
@@ -0,0 +1,6 @@
Query = GraphQL::ObjectType.define do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is in graph/ what are your thoughts on namespacing everything under Graph::?

We could also have Graph::Types::Planet later.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 yep good point

Comment thread Gemfile
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ 🔥

Comment thread config/application.rb Outdated
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.autoload_paths << Rails.root.join('app', 'graph')
config.autoload_paths << Rails.root.join('app', 'graph', 'mutations')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this one is needed? It doesn't automagically do subfolders if namespace matches folder name?

@xuorig
Copy link
Copy Markdown
Collaborator Author

xuorig commented Feb 7, 2017

removed 👍

@xuorig xuorig merged commit 866e343 into master Feb 7, 2017
@xuorig xuorig deleted the directory-structure-basic-setup branch February 7, 2017 23:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants